< previous page page_713 next page >

Page 713
HTML Template WebItemsA WebItem based on an HTML template file that already exists
Custom WebItemsA WebItem created totally in code
So what is a WebItem? Well, it is nothing but code (remember this is just an ActiveX DLL) and because this is a server-based application there is no visual interface. WebItems provide a way to connect Visual Basic program events to the document-based world of HTML.
Running an IIS Application
Before you go any further, look at the code for the WebClass. Right-click the class name in the Project Explorer window and choose View code. You should see the default code for the WebClass's Start event, as shown in Figure 31.9.
0713-01.jpg
Figure 31.9
The WebClass' 
Start event provides an initial
HTML screen via the familiar Response object.
Go ahead and run the project by clicking the VB Start button or pressing F5. Remember, because IIS applications are Web server-based like ASP, you need to have a Web server running to use and debug them.
note.gif The examples discussed in this chapter were created with Visual Basic, Personal Web Server, and Transaction Server (included with PWS) running on the same machine. square.gif

Each time you run your IIS Application in the VB IDE, Visual Basic generates an ASP file and attempts to launch it in Internet Explorer. The first time you run a new IIS Application, you will see a message like that in Figure 31.10, which asks you for the virtual directory name.
0713-02.jpg
Figure 31.10
Visual Basic automatically creates a virtual
directory and ASP file to host your WebClass.

 
< previous page page_713 next page >